package com.kakarote.ids.provider.common;

import java.util.Map;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "wukong.ids.auth")
public class OAuthProperties {
  private String clientId;
  
  private String clientSecret;
  
  private String redirectUri;
  
  private Map<String, Object> extra;
  
  public void setClientId(String clientId) {
    this.clientId = clientId;
  }
  
  public void setClientSecret(String clientSecret) {
    this.clientSecret = clientSecret;
  }
  
  public void setRedirectUri(String redirectUri) {
    this.redirectUri = redirectUri;
  }
  
  public void setExtra(Map<String, Object> extra) {
    this.extra = extra;
  }
  
  public boolean equals(Object o) {
    if (o == this)
      return true; 
    if (!(o instanceof OAuthProperties))
      return false; 
    OAuthProperties other = (OAuthProperties)o;
    if (!other.canEqual(this))
      return false; 
    Object this$clientId = getClientId(), other$clientId = other.getClientId();
    if ((this$clientId == null) ? (other$clientId != null) : !this$clientId.equals(other$clientId))
      return false; 
    Object this$clientSecret = getClientSecret(), other$clientSecret = other.getClientSecret();
    if ((this$clientSecret == null) ? (other$clientSecret != null) : !this$clientSecret.equals(other$clientSecret))
      return false; 
    Object this$redirectUri = getRedirectUri(), other$redirectUri = other.getRedirectUri();
    if ((this$redirectUri == null) ? (other$redirectUri != null) : !this$redirectUri.equals(other$redirectUri))
      return false; 
    Map<String, Object> this$extra = (Map<String, Object>)getExtra(), other$extra = (Map<String, Object>)other.getExtra();
    return !((this$extra == null) ? (other$extra != null) : !this$extra.equals(other$extra));
  }
  
  protected boolean canEqual(Object other) {
    return other instanceof OAuthProperties;
  }
  
  public int hashCode() {
    int PRIME = 59;
    int result = 1;
    Object $clientId = getClientId();
    result = result * 59 + (($clientId == null) ? 43 : $clientId.hashCode());
    Object $clientSecret = getClientSecret();
    result = result * 59 + (($clientSecret == null) ? 43 : $clientSecret.hashCode());
    Object $redirectUri = getRedirectUri();
    result = result * 59 + (($redirectUri == null) ? 43 : $redirectUri.hashCode());
    Map<String, Object> $extra = (Map<String, Object>)getExtra();
    return result * 59 + (($extra == null) ? 43 : $extra.hashCode());
  }
  
  public String toString() {
    return "OAuthProperties(clientId=" + getClientId() + ", clientSecret=" + getClientSecret() + ", redirectUri=" + getRedirectUri() + ", extra=" + getExtra() + ")";
  }
  
  public String getClientId() {
    return this.clientId;
  }
  
  public String getClientSecret() {
    return this.clientSecret;
  }
  
  public String getRedirectUri() {
    return this.redirectUri;
  }
  
  public Map<String, Object> getExtra() {
    return this.extra;
  }
}
